home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
sticpsrc.lzh
/
SOURCE.ARC
/
PCINT.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-08-14
|
833b
|
42 lines
NAME pcint
include pmacros.h
dseg
pubvar sssave,<dw ?>
pubvar spsave,<dw ?>
db 512 dup(?)
pubvar intstk,<label byte>
pubvar isat,<db 0>
dsegend
; common routine for interrupt return
pubproc doret
pop es
pop di
pop si
pop bp
pop dx
pop cx
pop bx
cmp isat@,1
jnz notat ; Only one 8259, so skip this stuff
mov al,0bh ; read in-service register from
out 0a0h,al ; secondary 8259
jmp short d1 ; Delay
d1: in al,0a0h ; get it
or al,al ; Any bits set?
jz notat ; nope, not a secondary interrupt
mov al,20h ; Get EOI instruction
out 0a0h,al ; Secondary 8259 (PC/AT only)
jmp short notat ; Delay
notat: mov al,20h ; Get EOI instruction
out 20h,al ; Primary 8259
mov ss,sssave@
mov sp,spsave@ ; restore original stack context
pop ds
pop ax
iret
pend doret
end